babl: make cache loading/parsing valgrind clean
authorØyvind Kolås <pippin@gimp.org>
Fri, 25 Aug 2017 23:14:28 +0000 (01:14 +0200)
committerØyvind Kolås <pippin@gimp.org>
Fri, 25 Aug 2017 23:14:32 +0000 (01:14 +0200)
babl/babl-cache.c

index abd6f0a8fa5797827d720996091a25b9cd8dc319..2b256285d9cb785b2c5df88b1d5355e09a638a01 100644 (file)
@@ -214,7 +214,7 @@ babl_file_get_contents (const char  *path,
   size = ftell (file);
   if (length) *length = size;
   rewind (file);
-  buffer = malloc(size + 8);
+  buffer = calloc(size + 8, 1);
 
   if (!buffer)
     {